﻿using System.Collections.ObjectModel;

namespace MultiMenuDemo
{
    public class MainWindowViewModel : CommunityToolkit.Mvvm.ComponentModel.ObservableObject
    {
        private ObservableCollection<Department> departments;
        public ObservableCollection<Department> Departments
        {
            get => departments;
            set => SetProperty(ref departments, value);
        }

        public MainWindowViewModel()
        {
            Departments = new ObservableCollection<Department> {
                new Department(){ Name = "部门1"},
                new Department(){ Name = "部门2"},
                new Department(){ Name = "部门3"},
                new Department(){ Name = "部门4"},
                new Department(){ Name = "部门5"},
                new Department(){ Name = "部门6"}
            };
        }
    }
}
